# 作者: spy
# 开发时间: 2021/12/25 9:55

from common.excel_util import ExcelUtil
from base.base_util import BaseUtil
from pageobject.message_page import RTMessage
from ddt import ddt, data, unpack


@ddt  # 声明当前类使用ddt数据驱动
class TestRTMessage(BaseUtil):

    @data(*ExcelUtil().read_excel_RTMessage())  # 给函数传值  *解析外层的[]
    @unpack  # 解包列表或元组
    def test_06_RTMessage(self, index, user_index, message):
        """ 实时消息 """
        pm = RTMessage(self.driver)
        pm.send_message(user_index, message)
